<template>
	<view class="info_details">
		<h2>{{infoDetails.post_title}}</h2>
		<view class="deta_top">
			<text>时间</text>
			<text>{{infoDetails.published_time}}</text>
		</view>
		<view class="deta_con" v-html="infoDetails.post_content">
			{{infoDetails.post_content}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				infoDetails: ''
			};
		},
		onLoad(option) {
			this.getArticleDetails(option.id)
		},
		mounted() { 
		},
		methods: {
			getArticleDetails(id) {
				this.$http({
					url: '/wxapi/ArticleApi/getArticleDetails',
					data: {
						article_id: id
					},
					methods: 'POST'
				}).then(res => {
					if (res.code == 200) {
						this.infoDetails = res.data
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.info_details { 
		padding: 40rpx;  
		h2 {
			margin-bottom: 20rpx;
			font-size: 48rpx;
			line-height: 60rpx;
			font-weight: 700;
		}

		.deta_top {
			display: flex;
			justify-content: space-between;
			height: 80rpx;
			font-size: 28rpx;
			line-height: 80rpx;
		}

		.deta_con {
			font-size: 44rpx;
			line-height: 40rpx;  
			img {
				width: 100% !important;
			}
		}
	} 
</style>
